//.do file fto test if treatment has an effect on likelihood of placing a bid 

set more off
clear
eststo clear


//SS I and II estimates
use "$dta/SS1and2.dta", clear


// SS I
logit bidindicator  slidervariation i.gender i.itemnum totalacres age productionyears rowcropacres crpindicator isagweek i.state i.agvise inag1and2 if agvise == 1, vce(cluster personid )

estpost margins, dydx(slidervariation)
eststo agvise1
su bidindicator if e(sample) & slidervariation == 0
estadd scalar depmean = r(mean)



// SS II
logit bidindicator  slidervariation i.gender i.itemnum totalacres age productionyears rowcropacres crpindicator isagweek i.state i.agvise inag1and2 if agvise == 2, vce(cluster personid )

estpost margins, dydx(slidervariation) 
eststo agvise2
su bidindicator if e(sample) & slidervariation == 0
estadd scalar depmean = r(mean)




//SS II

use "$dta/SS3.dta", clear


logit bidindicator default knowledge steward  age agyears owner i.gender i.state i.iscrp i.auction,  vce(cluster person_id)

estpost margins, dydx(default)
eststo hogvise
su bidindicator if e(sample) & default == 0
estadd scalar depmean = r(mean)




#delimit ;
esttab  agvise1 agvise2  hogvise  
	using "$outputs/treateffect_participation.tex", replace 
	b(3) se(3) label star(* 0.10 ** 0.05 *** 0.01)
	rename(slidervariation a default a)
	keep(a)
	coeflabels(a "Treatment (starting bid value at 100\%)")
	stats(dumm1 depmean  N , fmt(%9.0gc %03.2f %9.0gc) 
		labels("Control group:"  "  - Mean"   "Observations")) 
    mtitles("StewardShares I" "StewardShares II"  "StewardShares III" )
	nonote booktabs wrap varwidth(20) width(\hsize) ;

#delimit cr 
